package com.zsrd.system.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zsrd.core.response.ResponseSupport;
import com.zsrd.system.domain.SysOperLog;
import com.zsrd.system.domain.SysRole;
import com.zsrd.system.service.SysOperLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录人操作日志列表
 */
@RestController
@RequestMapping("/sysOperLog")
public class SysOperLogController {

    @Autowired
    private SysOperLogService sysOperLogService;

    /**
     * 分页
     *
     * @param
     * @return
     */
    @RequestMapping(value = "query", method = RequestMethod.POST)
//    @SaCheckPermission(value = "super:look",orRole = "admin")//“or校验”：具备指定权限或者指定角色即可通过校验
    public ResponseSupport query(@RequestBody SysOperLog sysOperLog) {
        IPage<SysOperLog> log = sysOperLogService.listByPage(sysOperLog);
        return ResponseSupport.success(log);
    }
}
